<div class="controls controls-top">
  <?php

  if ( $oPage->isNewRecord )
  {
      $sCurrentAction = 'Добавление';
  }
  else
  {
      $sCurrentAction = 'Редактирование';
  }

  $this->widget('application.components.BreadCrumb', array
  (
      'crumbs' => array
      (
          array('name' => 'Страницы', 'url' => array('/admin/pages')),
          array('name' => $sCurrentAction)
      )
  ));
  ?>
</div>

<?php if ( $oPage->hasErrors() ) : ?>
<div class="error">
    <?= CHtml::errorSummary($oPage); ?>
</div>
<br />
<?php endif; ?>

<div class="col_8 left">
    <form class="form" action="" method="post">
        <div>
            <label for="news-title">Алиас</label>
            <input id="news-title" type="text" name="Page[page_name]" value="<?= $oPage->page_name; ?>" class="width_8" />
        </div>
        
        <div>
            <label for="news-title">Заголовок</label>
            <input id="news-title" type="text" name="Page[page_title]" value="<?= $oPage->page_title; ?>" class="width_8" />
        </div>

        <div>
            <label for="news-title">Ключевые слова</label>
            <textarea id="news-text" name="Page[page_keywords]" class="width_8" rows="10"><?= $oPage->page_keywords; ?></textarea>
        </div>

        <div>
            <label for="news-title">Описание</label>
            <textarea id="news-text" name="Page[page_description]" class="width_8" rows="10"><?= $oPage->page_description; ?></textarea>
        </div>
        
        <div>
            <label for="news-text">Содержимое</label>
            <?php $this->widget('ext.fckeditor.FCKEditorWidget', array(
              "model"=>$oPage,
              "attribute"=>'page_text',
              "height"=>'400px',
              "width"=>'100%',
              //"toolbarSet"=>'Basic',
              "fckeditor"=>Yii::app()->themeManager->basePath."/default/fckeditor/fckeditor.php",
              "fckBasePath"=>Yii::app()->themeManager->baseUrl."/default/fckeditor/",
              "config" => array()
            )); ?>
        </div>

        <div class="controls">
            <button id="form-submit-button" type="submit" class="submit">Сохранить</button>&nbsp;&nbsp;
            <button type="button" class="submit" onclick="location.href='<?= $this->createUrl('/admin/pages'); ?>'">Отмена</button>
        </div>
    </form>
</div>